package cn.wolfcode.rbac.service;

import cn.wolfcode.rbac.domain.Department;
import cn.wolfcode.rbac.query.QueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface IDepartmentService {
    int deleteByPrimaryKey(Long id);

    int insert(Department record);

    Department selectByPrimaryKey(Long id);

    /**
     * 没有分页的查询所有
     * @return
     */
    List<Department> selectAll();

    /**
     * 分页的列表查询
     * @param qo 分页的条件
     * @return 查询到当前页的数据 + 分页条的数据
     */
    PageInfo<Department> selectList(QueryObject qo);

    int updateByPrimaryKey(Department record);

    void saveOrUpdate(Department department);

    void update(Long id, Department department);
}
